<?php

/**
 * Base actions for the jfJQMAmobeeAdsPlugin jfPortableDevice module.
 * 
 * @package     jfJQMAmobeeAdsPlugin
 * @subpackage  actions
 * @author      Jonas Fischer <info@jonasfischer.net>
 * @version     SVN: $Id: BaseActions.class.php 12534 2008-11-01 13:38:27Z Kris.Wallsmith $
 */
abstract class BasejfJQMAmobeeAdsActions extends sfActions
{

  public function executeProxy() {
    $this->getResponse()->setContentType('application/javascript');
    
    $proxy = new jfJQMAmobeeAdsProxy();
    try {
    	return $this->renderText($proxy->execute());
    }
    catch (jfJQMAmobeeAdsException $e) {
    	$this->getResponse()->setStatusCode($e->getCode());
    	return $this->renderText($e->getMessage());
    }
  }

}
